In network communication, security of data communication is becoming a focus of people's attention. Particularly, transport layer protocols such as Transmission Control Protocol (Transmission Control Protocol, “TCP” for short), User Datagram Protocol (User Datagram Protocol, “UDP” for short), Stream Control Transmission Protocol (Stream Control Transmission Protocol, “SCTP” for short), and Datagram Congestion Control Protocol (Datagram Congestion Control Protocol, “DCCP” for short) are vulnerable to off-path (off-path) attacks. Because off-path information is off the transmission path and beyond monitoring, the prior art can only reduce risks of being attacked by carrying a random value in a packet exchanged through a protocol. In this case, a data receiving device accepts only data in the packet that carries a correct random value. Therefore, an off-path attacker is unable to launch attacks effectively unless the attacker guesses or attempts the random value successfully in a very short time. Therefore, a larger number of significant bits of the random value bring greater difficulty to the attacker.
Currently, a transport layer protocol supports up to 32 bits of a significant random value. For example, a random value of a port is a significant random value of about up to 15 bits, and a serial number is a significant random value of about up to 17 bits. However, the number of bits of a random value is not enough for meeting the increasing computing capacity, and the available security protection is increasingly weaker. Besides, if each transport layer protocol is extended to increase the bits of the random value, the standardization workload is heavy, and the practice is not universally applicable.